<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->

    <div>
      <a-col>

        <a-form-item >
          <div style="color:rgba(0, 0, 0, 0.85);font-size:16px;">邻井的施工情况</div>
          <a-textarea placeholder="" allow-clear  @blur="onChange" v-model="ljdsgqk" />

        </a-form-item>
      </a-col>
      <a-col>

        <a-form-item >
          <div style="color:rgba(0, 0, 0, 0.85);font-size:16px;">邻井施工效果及生产情况</div>
          <a-textarea placeholder="" allow-clear @blur="onChange1" v-model="ljsgxgjscqk"/>

        </a-form-item>
      </a-col>
    </div>
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item class="a" label="已选择的邻井id为">
<!--              <a-input placeholder="请输入井id" v-model="queryParam.jingId"></a-input>-->
<!--              <a-form-item label="井id">-->
                <!--              <a-input placeholder="请输入井id" v-model="queryParam.jingId"></a-input>-->
                <j-multi-select-tag
                  v-model=" this.$store.state.jingId"
                  dictCode="ytsj_ljsgcs,jing_id,jing_id"
                  :disabled="true"
                  @change="para"

                >

                </j-multi-select-tag>
              </a-form-item>

          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<!--              <a-button type="primary" @click="searchQuery" icon="search" v-on:click="shifouxianshi">确定</a-button>-->
<!--              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>-->
<!--              <a @click="handleToggleSearch" style="margin-left: 8px">-->
<!--                {{ toggleSearchStatus ? '收起' : '展开' }}-->
<!--                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
<!--              </a>-->
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->
    <div style="text-align: left ;font-size: 16px" >邻井施工参数</div>
    <!-- 操作按钮区域 -->
<!--    <div class="table-operator">-->
<!--&lt;!&ndash;      <a-button @click="handleAdd" type="primary" icon="plus" v-if="this.isxianshi===true">新增</a-button>&ndash;&gt;-->
<!--&lt;!&ndash;      <a-button type="primary" icon="download" @click="handleExportXls('ytsj_ljsgcs')">导出</a-button>&ndash;&gt;-->
<!--&lt;!&ndash;      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">&ndash;&gt;-->
<!--&lt;!&ndash;        <a-button type="primary" icon="import">导入</a-button>&ndash;&gt;-->
<!--&lt;!&ndash;      </a-upload>&ndash;&gt;-->
<!--      &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!--&lt;!&ndash;      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>&ndash;&gt;-->
<!--      <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!--        <a-menu slot="overlay">-->
<!--          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
<!--        </a-menu>-->
<!--        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
<!--      </a-dropdown>-->
<!--    </div>-->

    <!-- table区域-begin -->
<!--    <div>-->
<!--      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<!--        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项-->
<!--        <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
<!--      </div>-->

      <a-table
        ref="table"
        size="middle"
        :scroll="{x:true}"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        @change="handleTableChange"
               destroyOnClose="true"
      >

        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            下载
          </a-button>
        </template>

        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>

          <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a @click="handleDetail(record)">详情</a>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>

      </a-table>

      <a-col>
<!--        <a-form-item label="邻井对比结论">-->
<!--          <a-input placeholder="请手动输入"></a-input>-->
<!--        </a-form-item>-->
        <a-form-item >
          <div style="color:rgba(0, 0, 0, 0.85);font-size:16px;">邻井对比结论</div>
          <a-textarea placeholder="" allow-clear @change="onChange2" v-model="ljzldb" />

        </a-form-item>
      </a-col>
      <a-col :span="24">
        <a-form-item  class="a" label="推荐液体体系" style="text-align: left"/>
<!--        <a-form-model-item label="低粘度滑溜水体系" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dlwz">-->
<!--          <a-input    ></a-input>-->
<!--        </a-form-model-item>-->
          <a-form-item >
            <div style="color:rgba(0, 0, 0, 0.85);font-size:16px;">低粘度滑溜水体系</div>
            <a-textarea placeholder="此处写出推荐理由及液体体系作用" allow-clear @change="onChange3" v-model="dndhlstx"/>
          </a-form-item>
<!--        <a-form-model-item label="中粘度滑溜水体系" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dlwz">-->
<!--          <a-input    ></a-input>-->
<!--        </a-form-model-item>-->
          <a-form-item >
            <div style="color:rgba(0, 0, 0, 0.85);font-size:16px;">中粘度滑溜水体系</div>
            <a-textarea placeholder="此处写出推荐理由及液体体系作用" allow-clear @change="onChange4" v-model="zndhlstx"  />
          </a-form-item>
<!--        <a-form-model-item label="酸液体系" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dlwz">-->
<!--          <a-input    ></a-input>-->
<!--        </a-form-model-item>-->
          <a-form-item >
            <div style="color:rgba(0, 0, 0, 0.85);font-size:16px;">酸液体系</div>
            <a-textarea placeholder="此处写出推荐理由及液体体系作用" allow-clear @change="onChange5" v-model="sytx" />
          </a-form-item>
<!--        </a-form-item>-->
      </a-col>


    <ytsj-ljsgcs-modal ref="modalForm" @ok="modalFormOk"></ytsj-ljsgcs-modal>
  </a-card>
</template>

<script>

  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import YtsjLjsgcsModal from './modules/YtsjLjsgcsModal'
  import bus from "./modules/bus";
  import {thirdLogin} from "../../../api/login";
  import {axios} from "../../../utils/request";

  export default {
      props:{
        //用于传递选择的井id
          haha1:{},

          chuanguo:{},
      },
    name: 'YtsjLjsgcsList',
    mixins:[JeecgListMixin, mixinDevice],
    components: {
       bus,
      YtsjLjsgcsModal
    },
    data () {
      return {
          ljzldb:null,
          ljsgxgjscqk:null,
          ljdsgqk:null,
          dndhlstx:null,
          zndhlstx:null,
          sytx:null,

          labelCol: {
              xs: { span: 24 },
              sm: { span: 2},
          },
          wrapperCol: {
              xs: { span: 24 },
              sm: { span: 20 },
          },
          isxianshi:false,
          chuanguolaidezhi:{},
        description: 'ytsj_ljsgcs管理页面',
        // 表头
        columns: [
          // {
          //   title: '#',
          //   dataIndex: '',
          //   key:'rowIndex',
          //   width:60,
          //   align:"center",
          //   customRender:function (t,r,index) {
          //     return parseInt(index)+1;
          //   }
          // },
          {
            title:'井id',
            align:"center",
            dataIndex: 'jingId'
          },
          {
            title:'井名',
            align:"center",
            dataIndex: 'jm'
          },
          {
            title:'施工段长',
            align:"center",
            dataIndex: 'sgdc'
          },
          {
            title:'施工段数',
            align:"center",
            dataIndex: 'sgds'
          },
          {
            title:'滑溜水',
            align:"center",
            dataIndex: 'hls'
          },
          {
            title:'胶联液',
            align:"center",
            dataIndex: 'jly'
          },
          {
            title:'线性胶',
            align:"center",
            dataIndex: 'xxj'
          },
          {
            title:'70/140石英砂',
            align:"center",
            dataIndex: 'sys70'
          },
          {
            title:'40/70石英砂',
            align:"center",
            dataIndex: 'sys40'
          },
          {
            title:'加沙强度',
            align:"center",
            dataIndex: 'jsqd'
          },
          {
            title:'排量',
            align:"center",
            dataIndex: 'pl'
          },
          {
            title:'测试产量',
            align:"center",
            dataIndex: 'cspl'
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            fixed:"right",
            width:147,
            scopedSlots: { customRender: 'action' }
          }
        ],
        url: {
          list: "/YtsjLjsgcs/ytsjLjsgcs/list",
          delete: "/YtsjLjsgcs/ytsjLjsgcs/delete",
          deleteBatch: "/YtsjLjsgcs/ytsjLjsgcs/deleteBatch",
          exportXlsUrl: "/YtsjLjsgcs/ytsjLjsgcs/exportXls",
          importExcelUrl: "YtsjLjsgcs/ytsjLjsgcs/importExcel",
          
        },
        dictOptions:{},
        superFieldList:[],
          parase: {},
          parase1:{} ,
      }
    },
      mounted(){
          this.searchQuery();
          this.shifouxianshi()

      },
    created() {


          this.xuanzhedejingid();
       this.shuchuchuanguolaidezhi();
    this.getSuperFieldList();
        this.searchQuery();

    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      },
    },
    methods: {
        onChange1(){
        localStorage.setItem("ljsgxgjscqk",this.ljsgxgjscqk)

        },
        onChange2(){
            localStorage.setItem("ljzldb",this.ljzldb)

        },
        onChange3(){
            localStorage.setItem("dndhlstx",this.dndhlstx)

        },
        onChange4(){
            localStorage.setItem("zndhlstx",this.zndhlstx)

        },
        onChange5(){
            localStorage.setItem("sytx",this.sytx)

        },


        onChange() {
            // console.log(this.parase)
            // let fd = new FormData;
            // fd.append("name","黄博");
            // this.$http.post("",fd).then(
            //
            // )

            // this.$http.post('/YtsjPfb/ytsjPfb/queryByfanganId',{params:{fanganId: localStorage.getItem("jingId")}}).then(result=> { console.log(result,"这是请求回来的方案idaaaaaaaaaaaaa");
        localStorage.setItem("ljdsgqk",this.ljdsgqk);

        },

        xuanzhedejingid(){
         console.log(this.chuandijingid1 +"chuandijigid1哈哈哈啊哈哈2")
        },

        shifouxianshi(){
            this.isxianshi= true

        },
          shuchuchuanguolaidezhi(){
              console.log(this.chuanguo+"这才是传过来的值哈哈哈");
              this.chuanguolaidezhi = this.chuanguo;
              this.queryParam.jingId =  this.chuanguolaidezhi

          },

      initDictConfig(){
      },
      getSuperFieldList(){
        let fieldList=[];
        fieldList.push({type:'string',value:'jingId',text:'井id',dictCode:''})
        fieldList.push({type:'string',value:'jm',text:'井名',dictCode:''})
        fieldList.push({type:'string',value:'sgdc',text:'施工段长',dictCode:''})
        fieldList.push({type:'string',value:'sgds',text:'施工段数',dictCode:''})
        fieldList.push({type:'string',value:'hls',text:'滑溜水',dictCode:''})
        fieldList.push({type:'string',value:'jly',text:'胶联液',dictCode:''})
        fieldList.push({type:'string',value:'xxj',text:'线性胶',dictCode:''})
        fieldList.push({type:'string',value:'sys70',text:'70/140石英砂',dictCode:''})
        fieldList.push({type:'string',value:'sys40',text:'40/70石英砂',dictCode:''})
        fieldList.push({type:'string',value:'jsqd',text:'加沙强度',dictCode:''})
        fieldList.push({type:'string',value:'pl',text:'排量',dictCode:''})
        fieldList.push({type:'string',value:'cspl',text:'测试产量',dictCode:''})
        this.superFieldList = fieldList
      }
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less';
  .a label{
    font-size: 16px;
  }
</style>